package com.hyfrogx.modules.push;

import com.alibaba.fastjson.JSONObject;
import com.hyfrogx.modules.push.notification.UmAndriodNotification;
import com.hyfrogx.modules.push.config.UmConfig;
import com.hyfrogx.modules.push.util.UmPushUtil;

public class Demo{

	public static void main(String[] args) throws Exception{

//		Map params=new HashMap<>();
//		params.put("appkey","123123");
//		params.put("description","测试222");
//		params.put("test","测试22");
		UmAndriodNotification um2=(UmAndriodNotification)UmPushUtil.getUotificationBySys(UmConfig.Sys.Android.name(),UmConfig.CasetType.broadcast.name(),null);
		//UmNotification um2=new UmAndriodNotification(UmConfig.CasetType.broadcast.name(),params);
		//um2.setImg("http://12312312");
		um2.setText("测试");
		um2.setTitle("测试");
		um2.setTicker("测试");
		um2.setDescription("测试");
		um2.setDisplayType(UmConfig.DisplayType.notification.name());
		//um2.setDeviceTokens("123123,123123,123123,12312");
		System.out.println(JSONObject.toJSONString(um2.getBody()));
		UmPushUtil.sendUmRequest(um2);


		//UmNotification um3=UmPushUtil.getUotificationBySys(UmConfig.Sys.ios.name(),UmConfig.CasetType.broadcast.name(),null);
		//System.out.println(JSONObject.toJSONString(um3.getBody()));
	}
}
